Dynomotion

Group: DynoMotion Message: 11761 From: rjreese29@ymail.com Date: 6/24/2015
Subject: Oembutton that functions when Mach is reset
Hi,

I using Mach and a kflop with a custom button on the screen. This button triggers a relay. Everything works with the button as expected when Mach is not in reset mode. When in software reset, the button doesn't function.

The vbscript is:
Notifyplugin(10331)
Sleep(300)
DoOEMButton(335)

Is there a way to get this soft button to work when Mach is in reset mode?
Or any other ideas would be appreciated.
I am trying to get a soft button on Mach screen to always work, and be able to turn off an output on my Konnect.

Thanks,
Rob
Group: DynoMotion Message: 11762 From: rjreese29@ymail.com Date: 6/24/2015
Subject: Re: Oembutton that functions when Mach is reset
Hi,
I have a correction on my last post.

The software button does work when Mach is in a voluntary reset. However, it doesn't work when there is an error of some kind (soft limit , hard limit , following error ... Is excedded)
I am still interested in being able to turn of this output on my konnect via a Mach button.


Thanks,
Rob
Group: DynoMotion Message: 11806 From: Tom Kerekes Date: 6/27/2015
Subject: Re: Oembutton that functions when Mach is reset
Hi Rob,

You are correct - right or wrong - our Plugin ignores Notification Messages when KFLOP Axes have been disabled.  You would need to "Reset" and enable axis before your Button could send Notifications to KFLOP.

A workaround might be to set an I/O bit instead using a Mach3 Output.  Actually it seems Mach3 keeps clearing those as well when in EStop mode.  However it seems that if you set an output it is set long enough to be detected by a KFLOP User Program before Mach3 decides to reset it.

Here is an example.  Configure a Mach3 Output to some real or Virtual KFLOP Bit.


Inline image


Configure your Mach3 Button Script to pulse the Output

ActivateSignal(OutPut6)
sleep(1000)
DeActivateSignal(OutPut6)


Have a watch loop in KFLOP monitoring for the bit to change.   Replace the Print statement with whatever you need to do like Set or Clear the Konnect Bit.



#include "KMotionDef.h"

main()
{
    for (;;)
    {
        while(ReadBit(47)) ;
        printf("Low\n");
        while(!ReadBit(47)) ;
        printf("High\n");
    }
}


HTH
Regards
TK